﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using GameBase.Form.Control;

namespace GameBase.Form
{
    class Cursor : VisibleObject
    {
        List<int> releasedSequence = new List<int> { 0,1,2,1 };
        List<int> pressdSequence = new List<int> { 3 };
        public Cursor()
        {
            sprite = new Sprite(@"System/Cursor", 2, 2,releasedSequence,100);
            sprite.Origin = new Vector2(3, 3);
            depth = 0;
            MouseState mouse = Mouse.GetState();
            position.X = mouse.X;
            position.Y = mouse.Y;
        }
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            MouseState mouse = Mouse.GetState();
            position.X = mouse.X;
            position.Y = mouse.Y;
            
        }
        public void Press()
        {
            sprite.FrameSequence = pressdSequence;
        }
        public void Release()
        {
            sprite.FrameSequence = releasedSequence;
            Color = MyControl.GetAColor();
        }
    }
}
